package data.trade;

import java.io.Serializable;
import java.util.Calendar;

@SuppressWarnings("serial")
public class Trade implements Serializable {
	protected String ID;
	protected String vipID;
	protected String clerkID;
	protected String time;
	
	public Trade(String record,String salesclerkID){
		Calendar c = Calendar.getInstance();
		int year = c.get(Calendar.YEAR); 
		int month = c.get(Calendar.MONTH)+1; 
		int day = c.get(Calendar.DATE); 
		int hour=c.get(Calendar.HOUR);
		int minute=c.get(Calendar.MINUTE);
		int second=c.get(Calendar.SECOND);
		time=String.valueOf(year)+'.'+String.valueOf(month)+'.'+String.valueOf(day);
		String saleTime=time+'.'+String.valueOf(hour)+'.'+
		                String.valueOf(minute)+'.'+String.valueOf(second);		
		this.vipID=record;
		this.ID=record+"."+salesclerkID+"."+saleTime;
		this.clerkID=salesclerkID;
	}


	public String getID(){
		return ID;
	}

	public String getVipID(){
		return vipID;
	}
	public String getClerkID(){
		return clerkID;
	}

	public String getTime(){
		return time;
	}

}
